﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;

    using Csla;

    using MarketPulse.BusinessLogic.Core;

#endregion

namespace MarketPulse.BusinessLogic.Private
{
    /// <summary>
    /// This class represents an indiviual attribute that can be associated with a specific branch.
    /// This class only has a data access factory to allow the creation of an instance, beyond that, it cannot be persisted outside of a branch object. 
    /// 
    /// Instances of this object belong to a branch object and their persistence and general management are handled by their owner (Branch object).
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.BranchFactory, MarketPulse.DataAccess.Factory", "CreateBranchAttribute", "")]
    public class BranchAttribute : MarketPulseBase<BranchAttribute>
    {
        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private BranchAttribute()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                /// <summary>
                /// Method that creates a new BranchAttribute via the DataPortal client proxy
                /// </summary>
                /// <returns>The newly created visit object</returns>
                internal static BranchAttribute New()
                {
                    return DataPortal.Create<BranchAttribute>();
                }

            #endregion

        #endregion

        #region Properties

            /// <summary>
            /// The GUID of the associated Branch 
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> BranchGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.BranchGUID);
            /// <summary>
            /// The GUID of the associated Branch 
            /// </summary>
            public Nullable<Guid> BranchGUID
            {
                get { return GetProperty(BranchGUIDProperty); }
                set { SetProperty(BranchGUIDProperty, value); }
            }

            /// <summary>
            /// The GUID of the associated BranchAttributeType
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> BranchAttributeTypeGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.BranchAttributeTypeGUID);
            /// <summary>
            /// The GUID of the associated BranchAttributeType
            /// </summary>
            public Nullable<Guid> BranchAttributeTypeGUID
            {
                get { return GetProperty(BranchAttributeTypeGUIDProperty); }
                set { SetProperty(BranchAttributeTypeGUIDProperty, value); }
            }

        #endregion

    }
}
